package com.yuntian.service.Impl;

import com.yuntian.entity.StaffMaster;
import com.yuntian.mapper.StaffMasterMapper;
import com.yuntian.service.StaffMasterService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 担当者マスタM003 员工服务实现类
 * @author yuntian
 */
@Service
@RequiredArgsConstructor
public class StaffMasterServiceImpl implements StaffMasterService {

    private final StaffMasterMapper staffMasterMapper;


    @Override
    public boolean login(StaffMaster staffMaster) {

        String staffCode = staffMaster.getM00301();
        String password = staffMaster.getM00303();
        String departmentCode = staffMaster.getM00304();
        StaffMaster login = staffMasterMapper.login(staffCode, password, departmentCode);
        if (login == null) {
            return false;
        }
        return true;
    }


}
